#!/usr/bin/env bash

notify() {
	notify-send -t 3000 "$1"
}

dir=$HOME/Pictures/screenshots
mkdir -p $dir

name="screenshot-`date \"+%Y-%m-%d_%H-%M-%S\"`.png"

case $1 in
	select)
		import "$dir/$name" && notify "Saved as $dir/$name"
		;;
	*)
		import -window root "$dir/$name" && notify "Saved as $dir/$name"
		;;
esac

